<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/demo/wage/wage.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/demo/wage/wage.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'WageId',
                footer: "Foots",
                cnName: '工资管理',
                name: 'wage/wage',
                url: "/wage/",
                sortName: "WageId"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"O_id":"","Ps_Id":"","StartDate":"","EndDate":""});
            const searchFormOptions = ref([[{"dataKey":"订单管理","data":[],"title":"订单","field":"O_id","type":"like"},{"dataKey":"工序","data":[],"title":"工序","field":"Ps_Id","type":"like"},{"title":"开始日期","field":"StartDate","type":"datetime"},{"title":"结束日期","field":"EndDate","type":"datetime"}]]);
            const columns = ref([{field:'WageId',title:'WageId',type:'int',sort:true,width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'O_id',title:'订单',type:'int',bind:{ key:'订单管理',data:[]},width:110,align:'left',sort:true},
                       {field:'Ps_Id',title:'工序',type:'int',bind:{ key:'工序',data:[]},width:110,align:'left'},
                       {field:'StartDate',title:'开始日期',type:'datetime',width:150,align:'left',sort:true},
                       {field:'EndDate',title:'结束日期',type:'datetime',width:150,align:'left',sort:true},
                       {field:'Count',title:'数量',type:'int',width:110,align:'left'},
                       {field:'Price',title:'单价',type:'decimal',width:110,align:'left'},
                       {field:'Z_Price',title:'总价',type:'decimal',width:110,align:'left'},
                       {field:'U_Name',title:'员工',type:'string',width:110,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
